package com.why.service;

import com.github.pagehelper.PageInfo;
import com.why.pojo.Product;
import org.apache.solr.client.solrj.SolrServerException;

import java.io.IOException;
import java.util.List;

public interface ProductService {

    PageInfo<Product> productList(Integer categoryLevelId,Integer pageNum,Integer pageSize);

    List<Product> selectProductList();
    //根据id查找商品
    Product selectByPrimaryKey(Integer id);
    //修改库存
    boolean updateStock(Integer stock, String id);

    boolean deleteProduct(Integer id) throws IOException, SolrServerException;

    boolean insertSelective(Product record) throws IOException, SolrServerException;

    boolean updateByPrimaryKeySelective(Product record) throws IOException, SolrServerException;


    PageInfo<Product> selectAllProduct(Integer pageNum,Integer pageSize);

    boolean putaway(Integer id) throws IOException, SolrServerException;

    Product selectProByName(String name);
}
